<script>
	import Vue from 'vue'
	import updateManager from '@/common/updateManager.js'
	import route from '@/common/route.js'
	export default {
		mixins: [updateManager, route],
		onLaunch: function() {
			console.log('App Launch')
			// 检查更新
			this.checkUpdate()
			uni.getSystemInfo({
				success: function(e) {
					// #ifndef MP
					Vue.prototype.StatusBar = e.statusBarHeight;
					if (e.platform == 'android') {
						Vue.prototype.CustomBar = e.statusBarHeight + 50;
					} else {
						Vue.prototype.CustomBar = e.statusBarHeight + 45;
					};
					// #endif

					// #ifdef MP-WEIXIN
					Vue.prototype.StatusBar = e.statusBarHeight;
					let custom = wx.getMenuButtonBoundingClientRect();
					Vue.prototype.Custom = custom;
					Vue.prototype.CustomBar = custom.bottom + custom.top - e.statusBarHeight;
					// #endif
				}
			})
			uni.onAppRoute(route => {
				// 设置访问记录
				this.setVisitRecord(route.path)
			 })
		},
		onShow: function() {
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style>
	/*每个页面公共css */
	@import url("colorui/main.css");
	@import url("colorui/icon.css");
	@import url("common/css/app.css");
</style>
